package com.woniuxy.controller;

import com.woniuxy.ResponseEntity.ResponseEntity;
import com.woniuxy.entity.RbacMenu;
import com.woniuxy.service.RbacMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/rbacmenu")
public class RbacMenuController {
    @Autowired
    RbacMenuService rbacMenuService;

    @RequestMapping("/getAllmenu")
    public ResponseEntity getAllmenu(){
       return rbacMenuService.findAllmenu();
    }

    @PostMapping("/updatedMenu")
    public ResponseEntity updatedMenu(@RequestBody RbacMenu rbacMenu){
        return rbacMenuService.updatedMenu(rbacMenu);
    }

}
